package ooday01.homework1;

public class Student {
    String name;
    int age;
    String className;
    String stuId;
    //无参
    Student(){

    }
    //有参
    Student(String name,int age,String className,String stuId){
        this.name=name;
        this.age=age;
        this.className=className;
        this.stuId=stuId;
    }
    void study(){
        System.out.println(name+"赚钱买宝马");
    }
    void sayHi(){
        System.out.println("你好我叫"+name+"今年"+age+"岁,在"+className+"班,学号为"+stuId);
    }
    void playWith(String anotherName){
        System.out.println("你好我叫"+name+"今年"+age+"岁,和"+anotherName+"是好朋友");
    }


}
